package com.example.service;

import com.example.dal.entity.DemoAuthor;
import com.example.repository.DemoAuthRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * @Author: flen
 * @Date: 2018/12/18 13:58
 */
@Service
public class DemoAuthorService {
	@Autowired
	DemoAuthRepo demoAuthRepo;

	public void addAuthor(String name) {
		//		demo， 演示用
		LocalDateTime dateTime = LocalDateTime.now();

		DemoAuthor author = new DemoAuthor(null,name,dateTime,dateTime );

		demoAuthRepo.newDemoAuthor(author);

	}
}
